<?php
/*
 +----------------------------------------------------------------------
 + Title        : ExtendQueryHelper 控制器
 + Author       : Randy_chen
 + Version      : V1.0.0.1
 + Initial-Time : 2022/10/15 10:10
 + Last-time    : 2022/10/15 10:10+ chen2
 + Desc         : ExtendQueryHelper
 +----------------------------------------------------------------------
*/


namespace randy\tools\units;

class ExtendQueryHelper extends BaseObject
{
    public array  $where   = [];
    public string $sort    = "";
    public string $order   = "";
    public bool   $is_page = true;

    /**
     * @return array
     */
    public function getWhere() : array
    {
        return $this->where;
    }

    public function appendWhere(array $where)
    {
        $this->where[] = $where;
        return $this;
    }


    /**
     * @param array $where
     */
    public function setWhere(array $where) : void
    {
        $this->where = $where;
    }

    /**
     * @return string
     */
    public function getSort() : string
    {
        return $this->sort;
    }

    /**
     * @param string $sort
     */
    public function setSort(string $sort) : void
    {
        $this->sort = $sort;
    }

    /**
     * @return string
     */
    public function getOrder() : string
    {
        return $this->order;
    }

    /**
     * @param string $order
     */
    public function setOrder(string $order) : void
    {
        $this->order = $order;
    }

    /**
     * @return bool
     */
    public function getIsPage() : bool
    {
        return $this->is_page;
    }

    /**
     * @param bool $is_page
     */
    public function setIsPage(bool $is_page) : void
    {
        $this->is_page = $is_page;
    }

}